/*
 * Hombro.h
 *
 *  Created on: 29/08/2010
 *      Author: julian
 */

#ifndef HOMBRO_H_
#define HOMBRO_H_

#include <GL/glut.h>
#include "Codo.h"

class Hombro : protected DisplayList{
private:
	Codo* elCodo;
	float* angulo;
public:
	Hombro(Codo* nuevoCodo, float* rotacion){
		this->elCodo=nuevoCodo;
		this->angulo = rotacion;
		inicializar();
	}

	virtual void ejecucion() const{
		//glRotatef(*angulo,0.0,-1.0,0.0);

		//Dibujo el hombro
		glPushMatrix();
		glColor3ub(255,198,000);
		glTranslatef(2.25,0.0,0.0);
		glScalef(4.5,0.6,0.6);
		glutSolidCube(1.0);
		glPopMatrix();


	}

	virtual void dibujar() const{
		glRotatef(*angulo,0.0,-1.0,0.0);
		DisplayList::dibujar();
		//Cambio de sistema de referencia para dibujar codo
		glPushMatrix();
		glTranslatef(4.5,0.0,0.0);
		elCodo->dibujar();
		glPopMatrix();
	}

	virtual ~Hombro(){}
};

#endif /* HOMBRO_H_ */
